package schema.model;

import model.BasicBean;
import java.sql.ResultSet;

public class SchemaTable extends BasicBean {

    public String TABLE_NAME = "";
    public String TABLE_COMMENT = "";

    public SchemaTable() {
    }

    public SchemaTable(ResultSet rs) {
        try {
            TABLE_NAME = validateString(rs.getString("TABLE_NAME"));
            TABLE_COMMENT = validateString(rs.getString("TABLE_COMMENT"));
            id = TABLE_NAME;
        } catch (Exception e) {
            System.out.println(e);
        }
    }

    @Override
    public String getHtmlRow() {
        String sz = "";
        sz += "<td class='st4middle'>" + TABLE_NAME + "</td>";
        sz += "<td class='st4middle'>" + TABLE_COMMENT + "</td>";
        return sz;
    }

    @Override
    public String getIdentifier() {
        return "idTabla=" + id;
    }
}